﻿using SD.ContentSystem.IAppService.DTOs.Outputs;
using SD.Infrastructure.AppServiceBase;
using SD.Infrastructure.DTOBase;
using System;
using System.Collections.Generic;
using System.ServiceModel;

namespace SD.ContentSystem.IAppService.Interfaces
{
    /// <summary>
    /// 相片服务契约接口
    /// </summary>
    [ServiceContract(Namespace = "http://SD.CMS.IAppService.Interfaces")]
    public interface IPhotoContract : IApplicationService
    {
        //命令部分

        #region # 创建相册 —— void CreatePhotoAlbum(string albumNo, string albumName...
        /// <summary>
        /// 创建相册
        /// </summary>
        /// <param name="albumNo">相册编号</param>
        /// <param name="albumName">相册名称</param>
        /// <param name="author">作者</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        [OperationContract]
        void CreatePhotoAlbum(string albumNo, string albumName, string author, int sort, string description);
        #endregion

        #region # 修改相册 —— void UpdatePhotoAlbum(Guid photoAlbumId, string albumName...
        /// <summary>
        /// 修改相册
        /// </summary>
        /// <param name="photoAlbumId">相册Id</param>
        /// <param name="albumName">相册名称</param>
        /// <param name="author">作者</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        [OperationContract]
        void UpdatePhotoAlbum(Guid photoAlbumId, string albumName, string author, int sort, string description);
        #endregion

        #region # 删除相册 —— void RemovePhotoAlbum(Guid photoAlbumId)
        /// <summary>
        /// 删除相册
        /// </summary>
        /// <param name="photoAlbumId">相册Id</param>
        [OperationContract]
        void RemovePhotoAlbum(Guid photoAlbumId);
        #endregion


        #region # 创建相片 —— void CreatePhoto(string photoAlbumNo, string photoName, string imagePath...
        /// <summary>
        /// 创建相片
        /// </summary>
        /// <param name="photoAlbumNo">相册编号</param>
        /// <param name="photoName">相片名称</param>
        /// <param name="sort">排序</param>
        /// <param name="url">链接地址</param>
        /// <param name="imagePath">图片路径</param>
        /// <param name="thumbPath">缩略图路径</param>
        /// <param name="description">描述</param>
        [OperationContract]
        void CreatePhoto(string photoAlbumNo, string photoName, string imagePath, string thumbPath, string url, int sort, string description);
        #endregion

        #region # 修改相片 —— void UpdatePhoto(Guid photoId, string photoName, string url...
        /// <summary>
        /// 修改相片
        /// </summary>
        /// <param name="photoId">相片Id</param>
        /// <param name="photoName">相片名称</param>
        /// <param name="sort">排序</param>
        /// <param name="url">链接地址</param>
        /// <param name="description">描述</param>
        [OperationContract]
        void UpdatePhoto(Guid photoId, string photoName, string url, int sort, string description);
        #endregion

        #region # 删除相片 —— void RemovePhoto(Guid photoId)
        /// <summary>
        /// 删除相片
        /// </summary>
        /// <param name="photoId">相片Id</param>
        [OperationContract]
        void RemovePhoto(Guid photoId);
        #endregion


        //查询部分

        #region # 获取相册 —— PhotoAlbumInfo GetPhotoAlbum(Guid photoAlbumId)
        /// <summary>
        /// 获取相册
        /// </summary>
        /// <param name="photoAlbumId">相册Id</param>
        /// <returns>相册</returns>
        [OperationContract]
        PhotoAlbumInfo GetPhotoAlbum(Guid photoAlbumId);
        #endregion

        #region # 获取相册 —— PhotoAlbumInfo GetPhotoAlbumByNo(string photoAlbumNo)
        /// <summary>
        /// 获取相册
        /// </summary>
        /// <param name="photoAlbumNo">相册编号</param>
        /// <returns>相册</returns>
        [OperationContract]
        PhotoAlbumInfo GetPhotoAlbumByNo(string photoAlbumNo);
        #endregion

        #region # 获取相册列表 —— IEnumerable<PhotoAlbumInfo> GetPhotoAlbums()
        /// <summary>
        /// 获取相册列表
        /// </summary>
        /// <returns>相册列表</returns>
        [OperationContract]
        IEnumerable<PhotoAlbumInfo> GetPhotoAlbums();
        #endregion

        #region # 分页获取相册列表 —— PageModel<PhotoAlbumInfo> GetPhotoAlbumsByPage(string keywords...
        /// <summary>
        /// 分页获取相册列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <returns>相册列表</returns>
        [OperationContract]
        PageModel<PhotoAlbumInfo> GetPhotoAlbumsByPage(string keywords, int pageIndex, int pageSize);
        #endregion


        #region # 获取相片 —— PhotoInfo GetPhoto(Guid photoId)
        /// <summary>
        /// 获取相片
        /// </summary>
        /// <param name="photoId">相片Id</param>
        /// <returns>相片</returns>
        [OperationContract]
        PhotoInfo GetPhoto(Guid photoId);
        #endregion

        #region # 根据相册获取相片列表 —— IEnumerable<PhotoInfo> GetPhotosByAlbum(string photoAlbumNo)
        /// <summary>
        /// 根据相册获取相片列表
        /// </summary>
        /// <param name="photoAlbumNo">相册编号</param>
        /// <returns>相片列表</returns>
        [OperationContract]
        IEnumerable<PhotoInfo> GetPhotosByAlbum(string photoAlbumNo);
        #endregion

        #region # 分页获取相片列表 —— PageModel<PhotoInfo> GetPhotosByPage(string keywords, string photoAlbumNo...
        /// <summary>
        /// 分页获取相片列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="photoAlbumNo">相册编号</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <returns>相片列表</returns>
        [OperationContract]
        PageModel<PhotoInfo> GetPhotosByPage(string keywords, string photoAlbumNo, int pageIndex, int pageSize);
        #endregion
    }
}
